package Com.HupochuanAdmin.Dal.Tab;

import java.util.Hashtable;
import java.util.List;
import java.util.Vector;

import Com.Hupochuan.Dal.DBManager.DBManager;
import Com.Hupochuan.Vo.SourceMode;

public class SourceModeTab {
	/*
	 * 本类私有对象
	 */
	private DBManager<SourceMode> dbManager = new DBManager<SourceMode>(SourceMode.class);
	
	/*
	 * 单一实例
	 */
	private SourceModeTab(){}
	private static SourceModeTab sourceModeTab = new SourceModeTab();
	public static SourceModeTab getObject(){
		return sourceModeTab;
	}
	
	/*
	 * 获得资源状况列表
	 */
	public List<SourceMode> findSourceModeList(){
		//参数部分
		List<SourceMode> sourceModeList = new Vector<SourceMode>();
		StringBuffer sqlBuff = new StringBuffer();
		Hashtable<String,Object> paraHash = new Hashtable<String,Object>();
		
		//sql语句部分
		sqlBuff.append(" select * from SourceMode ");
		sqlBuff.append(" order by weight desc,id ");
		
		//执行sql 
		sourceModeList = this.dbManager.querySqlReturnVoList(sqlBuff.toString(),paraHash);
		
		//返回列表
		return sourceModeList;
	}
}
